﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using NFine.Data.Entity.SystemManage;

namespace NFine.Data.Map.SystemManage
{
    public class OrganizeMap : IEntityTypeConfiguration<Organize>
    {
        /// <summary>
        /// PassageCategories FluentAPI配置
        /// 
        /// 添加复合主键、配置多对多关系
        /// </summary>
        /// <param name="builder"></param>
        public void Configure(EntityTypeBuilder<Organize> builder)
        {
            //配置过滤器
            builder.HasQueryFilter(organize => EF.Property<bool>(organize, "DeletedMark") == false);
        }
    }
}
